<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- 正文区域 -->
<section class="content" th:fragment="produc">

    <!-- .box-body -->
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">列表</h3>
            <span>111</span>
        </div>

        <div class="box-body">

            <!--工具栏-->
            <div class="pull-left">
                <div class="form-group form-inline">
                    <div class="btn-group">

                        <button type="button" class="btn btn-default" title="删除" onclick="deletelist()">
                            <i class="fa fa-trash-o" ></i> 删除
                        </button>


                        <button type="button" class="btn btn-default" title="刷新">
                            <i class="fa fa-refresh"></i> 刷新
                        </button>
                    </div>
                </div>
            </div>


            <!--数据列表-->
            <table id="dataList"
                   class="table table-bordered table-striped table-hover dataTable">
                <thead>
                <tr>
                    <th class="" style="padding-right: 0px;"><input
                            id="selall" type="checkbox" class="icheckbox_square-blue">
                    </th>
                    <th class="sorting_asc">ID</th>
                    <th class="sorting_asc">用户ID</th>
                    <th class="sorting_asc sorting_asc_disabled">文章标题</th>
                    <th class="sorting">创建时间</th>
                    <th class="sorting">修改时间</th>
                    <th class="text-center sorting">回复数</th>
                    <th class="sorting">浏览数</th>
                    <th class="text-center sorting">标签</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>
                <tbody>


                <tr th:each="list:${questionList}">
                    <td><input name="ids" type="checkbox" th:value="${list.id}"></td>
                    <td th:text="${list.id}"></td>
                    <td th:text="${list.creator}"></td>
                    <td th:text="${list.title}"></td>
                    <td th:text="${#dates.format(list.gmtcreate,'yyyy-MM-dd HH:mm')}"></td>
                    <td th:text="${#dates.format(list.gmtmodified,'yyyy-MM-dd HH:mm')}"></td>

                    <td class="text-center" th:text="${list.commentCont}"></td>
                    <td class="text-center" th:text="${list.viewcont}"></td>
                    <td class="text-center" th:text="${list.tag}"></td>
                    <td class="text-center">
                        <a href="http://www.ggzj.xyz/question/51" th:href="@{'http://www.ggzj.xyz/question/'+${list.id}}"  target="_blank" class="btn bg-olive btn-xs">详情</a>
                        <a href="#" th:href="@{'http://localhost:8989/question/deletequestion?id='+${list.id}}" class="btn bg-olive btn-xs">删除</a>
                    </td>
                </tr>
                </c:forEach>
                </tbody>
                <!--
            <tfoot>
            <tr>
            <th>Rendering engine</th>
            <th>Browser</th>
            <th>Platform(s)</th>
            <th>Engine version</th>
            <th>CSS grade</th>
            </tr>
            </tfoot>-->
            </table>
            <!--数据列表/-->



            <!--工具栏/-->

        </div>
        <!-- 数据表格 /-->


    </div>
    <!-- /.box-body -->

    <!-- .box-footer-->
    <div class="box-footer">
        <div class="pull-left">
            <div class="form-group form-inline">
                总共<span th:text="${last}">1</span> 页，共<span th:text="${sum}"></span> 条数据。 每页 <select class="form-control" th:onchange="|display(this)|">
                <option th:selected="${pageSize==1}">1</option>
                <option th:selected="${pageSize==2}">2</option>
                <option th:selected="${pageSize==3}">3</option>
                <option th:selected="${pageSize==4}">4</option>
                <option th:selected="${pageSize==8}">8</option>
            </select> 条
            </div>
        </div>

        <div class="box-tools pull-right">
            <ul class="pagination">
                <li><a href="#" aria-label="Previous" th:onclick="Home(1,[[${pageSize}]])">首页</a></li>
                <li><a href="#" th:onclick="Home([[${pre}]],[[${pageSize}]])">上一页</a></li>


                <li th:each="page1:${#numbers.sequence(1,last)}" th:class="${page1==cur}?'active':''">
                    <a href="#" th:text="${page1}" th:onclick="Home([[${page1}]],[[${pageSize}]])">1</a>
                </li>

                <li  th:classappend="${cur==last} ? 'disabled' : ''">
                    <a href="#"  th:style="${cur==last}? 'pointer-events:none':''" th:onclick="Home([[${next}]],[[${pageSize}]])">下一页</a></li>
                <li><a href="#" aria-label="Next" th:onclick="Home([[${last}]],[[${pageSize}]])">尾页</a></li>
            </ul>
        </div>

    </div>
    <!-- /.box-footer-->



    </div>

</section>
<!-- 正文区域 /-->
</body>
</html>